package com.sinopec.scandevice.constants

import com.sinopec.basemodule.base.BaseView
import com.sinopec.basemodule.base.baseImpl.BasePresenterImpl

/**
 * @Description: 本地更新
 * @ClassName: CustomAppUpdateContract
 * @author lwj
 */
class CustomAppUpdateContract {

    interface View : BaseView {

        //刷新下载进度
        fun refreshDownLoadProgress(value: Int)

        //下载异常
        fun downloadErrorRefreshUi()
    }

    abstract class Presenter constructor(view: View) : BasePresenterImpl<View>(view) {

        //存储权限未授予
        abstract fun onStoragePermissionNotGranted()

        //开始执行下载流程
        abstract fun initDownloadListener(appUpdateUrl: String?)

        //取消下载
        abstract fun cancelDownloadListener()

        //执行安装
        abstract fun onInstall()
    }
}